const batchAuditIdList = {
  state: {
    batchIdList: sessionStorage.getItem('batchIdList')||[],//存放需要批量操作的礼品ID
    isBatch:sessionStorage.getItem('isBatch')||0,//批量审核是否提交
    thumbnailImg:"?x-oss-process=image/resize,w_200", //缩略图路径
    giftDisplay:sessionStorage.getItem('SMS_GiftDisplay')||sessionStorage.setItem('SMS_GiftDisplay','1'),
  },
  mutations: {
    addBatchIdList(state,arr){
      state.batchIdList=arr;
      var batchIdList = JSON.parse(JSON.stringify(arr));
      sessionStorage.setItem('batchIdList',JSON.stringify(batchIdList))
    },
    changeIsBatch(state,i){
      state.isBatch=i;
      sessionStorage.setItem('isBatch',state.isBatch)
    },
    updategiftDisplay(state,i){
      state.giftDisplay = i;
      sessionStorage.setItem('SMS_GiftDisplay',i);
    },
  },
  actions: {//调用这里去触发mutations，如何调用？在组件内使用this.$store.dispatch('action中对应名字', 参数)
    // addVisitedViews({ commit, state }, view) {//通过解构赋值得到commit方法
    //   commit('ADD_VISITED_VIEWS', view)
    // },
  }
}
export default batchAuditIdList
